﻿
function Unlock()
{  
    document.getElementById("ctl00_Body_dvMaster").style.display = "none";
    var aryDiv = new Array("dvNewFasNO", "dvKeeper","dvPRNO");
    for (var i = 0; i < aryDiv.length; i++) {
        var obj = document.getElementById("ctl00_Body_" + aryDiv[i]);
        if (obj == null)
            continue;
        obj.style.display = "none"; 
    }      
    
}
function Lock(){
    var dvMaster = document.getElementById("ctl00_Body_dvMaster");
    dvMaster.style.width = document.documentElement.clientWidth;
    dvMaster.style.height = document.documentElement.clientHeight;
    dvMaster.style.display = "";
}
function showNewFasNO()
{
    Lock();
    var dvNewFasNO = document.getElementById("ctl00_Body_dvNewFasNO");
    dvNewFasNO.style.left = (document.documentElement.clientWidth-100)/2-200;
    dvNewFasNO.style.top = document.documentElement.clientHeight/2-200;
    dvNewFasNO.style.display = "";
    var txtTable = document.getElementById("ctl00_Body_UCSelectAssetNO1_txtQueryTableName");
    txtTable.value="CorrectQuery";
    
}
function showKeeper(){
    Lock();
    var dvKeeper = document.getElementById("ctl00_Body_dvKeeper");
    dvKeeper.style.left = (document.documentElement.clientWidth-100)/2-200;
    dvKeeper.style.top = document.documentElement.clientHeight/2-200;
    dvKeeper.style.display ="";
    var txtConditon = document.getElementById("ctl00_Body_UCSelectEmp1_txtCondition");
    txtConditon.value="CorrectQuery";
    
}
function showPRNO(){

    Lock();
    var dvPRNO = document.getElementById("ctl00_Body_dvPRNO");
    dvPRNO.style.left = (document.documentElement.clientWidth-100)/2-200;
    dvPRNO.style.top = document.documentElement.clientHeight/2-200;
    dvPRNO.style.display = "";
    var txtCondition = document.getElementById("ctl00_Body_UCSelectPR1_txtTableName");
    txtCondition.value = "CorrectQuery";
    
}


function SetAssetSelectedValue(strAssetNO, strKeepDept, strKeeper, strChiName, strBrand, strSpec, strModel, strKeeperNO) {
    Unlock();   
    document.getElementById("ctl00_Body_txtAssetNO").value = strAssetNO;
}
 function SetApplicantValue(strEmpNO, strEmpChiName, strEngName, strDeptNO, strExtNO){
    Unlock();
    document.getElementById("ctl00_Body_txtKeepName").value = strEmpChiName;
}
function SetPRValue(strPRNO){

    Unlock()
    document.getElementById("ctl00_Body_txtPRNO").value = strPRNO;
}